package base.service.impl;

import base.bean.CheckinEntity;
import base.bean.PersonsEntity;
import base.dao.IPersonDao;
import base.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by uas on 2018/3/19.
 */

@Service
public class IPersionServiceImpl implements IPersonService {
    @Autowired
    IPersonDao iPersonDao;
    String sql;
    @Override
    public void updateNameById(String personname, int roomiid, String cardtype, String cardid,
                               String sex, String phone, int id) {
        iPersonDao.updateNameById(personname, roomiid, cardtype, cardid, sex, phone, id);
    }

    @Override
    public void delete(int id) {
        iPersonDao.delete(id);
    }

    @Override
    public List<PersonsEntity> findAll() {

        return iPersonDao.findAll();
    }

    @Override
    public PersonsEntity findOne(int id) {
        return iPersonDao.findOne(id);
    }


}
